<script>
    export default {
        name: 'renderComponent',
        props: {
            componentProps: String
        },
        data() {
            return {
                componentMsg: 'componentMsg'
            }
        },
        beforeCreate() {
            console.log('beforeCreate')
        },
        created() {
            console.log('created')
        },
        beforeMount() {
            console.log('beforeMount')
        },
        mounted() {
            console.log('mounted')
        },
        /**
         * 通过 render 创建组件而不是通过 template。
         * render是介于 beforeMount 和 mounted 之前的。
         */
        render(h) {
            console.log('render');
            return h('h1', "我在render");
        }
    }
</script>